/****************************************************************************
 *
 * Copyright (C) 2003-2008 Los Alamos National Security, LLC
 *                         Packet Analytics Corporation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License Version 2 as
 * published by the Free Software Foundation.  You may not use, modify or
 * distribute this program under any other version of the GNU General
 * Public License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 ****************************************************************************/
package nfse.gui.record;

import com.google.gwt.user.client.rpc.IsSerializable;

public class FlexRecordField implements IsSerializable {
    public static final int TYPE_INT = 1;
    public static final int TYPE_LONG = 2;
    public static final int TYPE_FLOAT = 3;
    public static final int TYPE_STRING = 4;
    public static final int TYPE_BOOLEAN = 5;
    
    public static final int SUB_TYPE_NONE = 0;
    public static final int SUB_TYPE_TIMESTAMP = 1;
    public static final int SUB_TYPE_DATE = 2;
    public static final int SUB_TYPE_TIME = 3;
    public static final int SUB_TYPE_IP_ADDR = 4;
    public static final int SUB_TYPE_MAC_ADDR = 5;
    public static final int SUB_TYPE_PORT = 6;
    public static final int SUB_TYPE_PROTOCOL = 7;
    public static final int SUB_TYPE_EMAIL_ADDR = 8;
    public static final int SUB_TYPE_CHECK_MARK = 9;
    public static final int SUB_TYPE_BYTES = 10;
    public static final int SUB_TYPE_SOLERA_DRILL_DOWN = 11;
    public static final int SUB_TYPE_IMAGE = 12;
    
    public String name = "";
    public String columnName = "";
    public int type = FlexRecordField.TYPE_STRING;
    public int subType = FlexRecordField.SUB_TYPE_NONE;
    public boolean hidden = false;
    public boolean sortable = false;
    public int columnWidth = 0;  
    
    public FlexRecordField() {
        
    }
    
    public FlexRecordField(String name, String columnName, int type, int subType) {
        this.name = name;
        this.columnName = columnName;
        this.type = type;
        this.subType = subType;
    }
    
    public FlexRecordField(String name, String columnName, int type, int subType, boolean sortable, int columnWidth) {
        this.name = name;
        this.columnName = columnName;
        this.type = type;
        this.subType = subType;
        this.sortable = sortable;
        this.columnWidth = columnWidth;
    }  
}
